package com.ydj.framework.third.ip;

import lombok.Data;

import java.io.Serializable;

@Data
public class ThirdGetIpAddressByTencentApiRes implements Serializable {

    /**
     * status : 0
     * message : Success
     * request_id : 94565081dfc34f08a5a0f1e28a94da59
     * result : {"ip":"113.64.116.70","location":{"lat":24.1365,"lng":115.73119},"ad_info":{"nation":"中国","province":"广东省","city":"梅州市","district":"兴宁市","adcode":441481,"nation_code":156}}
     */

    private Integer status;
    private String message;
    private String request_id;
    private ResultBean result;

    @Data
    public static class ResultBean implements Serializable {
        /**
         * ip : 113.64.116.70
         * location : {"lat":24.1365,"lng":115.73119}
         * ad_info : {"nation":"中国","province":"广东省","city":"梅州市","district":"兴宁市","adcode":441481,"nation_code":156}
         */

        private String ip;
        private LocationBean location;
        private AdInfoBean ad_info;

        @Data
        public static class LocationBean implements Serializable {
            /**
             * lat : 24.1365
             * lng : 115.73119
             */

            private Double lat;
            private Double lng;
        }

        @Data
        public static class AdInfoBean implements Serializable {
            /**
             * nation : 中国
             * province : 广东省
             * city : 梅州市
             * district : 兴宁市
             * adcode : 441481
             * nation_code : 156
             */

            private String nation;
            private String province;
            private String city;
            private String district;
            private Integer adcode;
            private Integer nation_code;
        }
    }
}
